package com.qf.controller.shangpin_controller;

import com.qf.bean.Commodity;
import com.qf.dao.shangpin_dao.CommDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 14/12/2019
 * Echo
 * sassspringboot
 * Alibaba
 */
@RestController
public class AjaxController {
    @Autowired
    private CommDao commDao;
    @RequestMapping("/findByCode")
    public Commodity findByCode(String code){
     Commodity commodity=commDao.findByCode(code);
        System.out.println(commodity);
     return commodity;
    }
}
